package com.example.gss.entity;

import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 科研成果实体类，对应数据库中的researchachievement表
 */
@Data
public class ResearchAchievement implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    private String achievementId;   // 成果ID
    private String studentId;       // 学号
    private String type;            // 类型(论文/专利/科研项目)
    private String title;           // 标题/名称
    private String category;        // 分类(CCF A类/中科院1区等)
    private String status;          // 状态(已发表/录用/实质审查等)
    private Date publishDate;       // 发表/申请日期
    private BigDecimal score;       // 计算得分
    private Boolean isRepresentative; // 是否代表性成果
    private String coAuthors;       // 合作作者(JSON格式存储作者顺序)

    // 无参构造函数
    public ResearchAchievement() {
    }

    // 有参构造函数
    public ResearchAchievement(String achievementId, String studentId, String type,
                               String title, String category, String status,
                               Date publishDate, BigDecimal score, Boolean isRepresentative,
                               String coAuthors) {
        this.achievementId = achievementId;
        this.studentId = studentId;
        this.type = type;
        this.title = title;
        this.category = category;
        this.status = status;
        this.publishDate = publishDate;
        this.score = score;
        this.isRepresentative = isRepresentative;
        this.coAuthors = coAuthors;
    }

    // 重写toString方法
    @Override
    public String toString() {
        return "ResearchAchievement{" +
                "achievementId='" + achievementId + '\'' +
                ", studentId='" + studentId + '\'' +
                ", type='" + type + '\'' +
                ", title='" + title + '\'' +
                ", category='" + category + '\'' +
                ", status='" + status + '\'' +
                ", publishDate=" + publishDate +
                ", score=" + score +
                ", isRepresentative=" + isRepresentative +
                ", coAuthors='" + coAuthors + '\'' +
                '}';
    }
}